import json

from sqlalchemy import Column, ForeignKey, Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base

BaseModel = declarative_base()

# 得到默认Base基类
# Base = declarative_base()


class News(BaseModel):
    __tablename__ = "news"
    id = Column(Integer, primary_key=True, index=True)
    news_id = Column(String(28), comment="新闻ID", nullable=False)
    title = Column(String(255), comment="新闻标题", nullable=False)
    content = Column(String(255), comment="新闻内容", nullable=False)

